Date.prototype.toStringDMY = function() {
    return [this.getDate().toString().pad(2), (this.getMonth()+1).toString().pad(2), this.getFullYear().toString().pad(4)].join('/');
};

Date.prototype.isToday = function() {
    return this.toStringDMY() === new Date().toStringDMY();
};

Date.fromStringDMY = function(ddmmyyyy) {
	ddmmyyyy = ddmmyyyy.replace(/\D/g, '');
	var day = parseInt(ddmmyyyy.substr(0, 2));
	var month = parseInt(ddmmyyyy.substr(2, 2)) - 1;
	var year = parseInt(ddmmyyyy.substr(4, 4));
	return new Date(year, month, day, 0, 0, 0, 0)
}
